]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
extensionPrefs: Initialize gettext
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 19 Mar 2020 19:38:16 +0000 (20:38 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Thu, 19 Mar 2020 20:53:40 +0000 (20:53 +0000)
I misremembered that imports.package.start() would set up the correct
gettext domain, but the module only provides a convenience method
for doing that.

Use it to bring back translations in the Extensions app, whoops.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1108

js/extensionPrefs/js/main.js
lint/eslintrc-shell.yml

index aa325ea92e0b7a946208533c65f55bbf278913d8..9dab3c392862beac30c68e8c07c297da1459d2fa 100644 (file)
@@ -2,12 +2,11 @@
 imports.gi.versions.Gdk = '3.0';
 imports.gi.versions.Gtk = '3.0';
 
-imports.package.initFormat();
-
 const Gettext = imports.gettext;
+const Package = imports.package;
 const { Gdk, GLib, Gio, GObject, Gtk } = imports.gi;
 
-const _ = Gettext.gettext;
+Package.initFormat();
 
 const ExtensionUtils = imports.misc.extensionUtils;
 
@@ -782,6 +781,7 @@ function initEnvironment() {
 
 function main(argv) {
     initEnvironment();
+    Package.initGettext();
 
     new Application().run(argv);
 }
index 77e0bd5f298217bf6f9ceaea8abf9a7c89e91860..14617a810345a7d45783c259254bfd7bcfb9a6fa 100644 (file)
@@ -17,7 +17,6 @@ rules:
 overrides:
   - files: js/**
     excludedFiles:
-      - js/extensionPrefs/**
       - js/portalHelper/*
     globals:
       global: readonly